package com.st.lwb;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.st.lwb.daoimpl.SaveDB;
import com.st.lwb.utils.Constant;

public class HomeMoreActivity extends Activity implements OnClickListener{
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.home_more_page);
		
		TextView more_data_backup = (TextView) findViewById(R.id.more_data_backup);
		more_data_backup.setOnClickListener(this);
		TextView more_data_recovery = (TextView) findViewById(R.id.more_data_recovery);
		more_data_recovery.setOnClickListener(this);
		
		TextView more_aboutus = (TextView) findViewById(R.id.more_aboutus);
		more_aboutus.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.more_data_backup:
			SaveDB.backUpData(this, Constant.BACKUP_TYPE_FOND);
			break;
		case R.id.more_data_recovery:
			SaveDB.recoveryData(this, Constant.BACKUP_TYPE_FOND);
			break;
		case R.id.more_aboutus:
			startActivity(new Intent(HomeMoreActivity.this,AboutUsActivity.class));
			break;
		default:
			break;
		}
	}
}
